

function enCode(a, b) {
    for (var b = b, c = a.length, d = b.length, e = "", f = 0; c > f; f++)
        e += String.fromCharCode(a.charAt(f).charCodeAt(0) + b.charAt(f % d).charCodeAt(0));
    return enCodeFun(e)
}

function enCodeFun(a) {
    if (!/([^\u0000-\u00ff])/.test(a)) {
        for (var b, c, d, e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", f = 0, g = []; f < a.length; ) {
            switch (b = a.charCodeAt(f),
            d = (f + 1) % 3) {
            case 1:
                g.push(e.charAt(b >> 2));
                break;
            case 2:
                g.push(e.charAt((3 & c) << 4 | b >> 4));
                break;
            case 0:
                g.push(e.charAt((15 & c) << 2 | b >> 6)),
                g.push(e.charAt(63 & b))
            }
            c = b,
            f++
        }
        return 1 == d ? (g.push(e.charAt((3 & c) << 4)),
        g.push("==")) : 2 == d && (g.push(e.charAt((15 & c) << 2)),
        g.push("=")),
        g.join("")
    }
}
var j = 'encryptUserName%253D18656565656%2526encryptPassword%253D12312eqwde%2526sceneFlag%253D1%2526loginChannel%253D208000103007%2526dfpToken%253DTHVUBd186fdeada550ZNYe739___w7DDp8KYwpthw5AZbMOxLWfCq8OECsOGw7hcwqnCvMOi%2526detect%253Dmmds_1iXoQQQz1c1oQQQS1b1QoQQQi1P1oQQQa1F1oQQQa1s1oQQQa101oQQQa1H1loQQQa1I1oQQQa1W1oQQQi1x1oQQQz1g1oQQQN1T1loQQQe191bQQQR1e1uQQQT1D1bQQQ61p1uQQQd1S1QoQQQK1a1oQQQZ1luoQQQh1LuoQQQt1ouoQQQP1OuQoQQQn15uvQQQzXUu1QQQjXmuoQQQJXtuoQQQWX4uQoQQQIXsuQlQQZXsubQQQZX4uuQQQMXtuYQQQ2XmuQ4QQQ~XFu.QQQ-XFuPQQQ-XUu5QQQsXUuYQQQ4X.uQMQQQtX.u767nrJ6767wvQQwnwcPIlQtPonHoQQ5yIL5olQxPb1HClQoXBuuCCQtX.u7nrJ67n6E67Be3nrGEnb0VrIbEKJebx63Bb236exVKB22B07rVJ7n6e677VrV7DxcQQQQQcRQQw2lQQQQQl5cQ7t67kbbtr26t6ner7n72bPNK0BAN0K7nnennt2tr37~ycQWlilQQQmLQQVl-lQQQ~lQQWl_lQQQ6lQQVl9lQQQ8lQQWlelQQQNlQQVl6lQQQ9lQQWlUlQQQDcQQWl4QQQQQQQQWlxlQQQWVlQilncQQO7n3trJrt3nr6rn7n7QlcnLX1uob7vXLQSv515QQQ1vt15QQQro_1YQQQIuN15QQQ91QuQ5QQQ511uYQQQL1qu5QQQwXPu5QQQAXUu5QQQAX4uQ5QQQAXMuYQQQn1EuYQQQq1ju5QQQB1zuYQQQr1wuQnQQQx1coPQQQ61nonQQQ91no9QQQT1wuYQQQd1zuQ.QQQW1eu5QQQh1ju5QQQ.1guxQQQc1KuElQQwXKuQoQQQaXWuoQQQGXWuoQQQpXIuuQQQTXZuoQQQWX0uQbQQQ2XsubQQQBXtuvQQQPXBuXQQQOXBuuQQQqXBuQ4QQQbXBumQQQoXBu0QQQoXBu-1CQ-oGLHQQQS1KXloQQQz1gXuQQQz18XoQQQz622niEVrVt_._e2282fa8-6e44-4c67-b9b1-2335858a8904_._%2526terminal%253DPC%2526referenceURL%253Dhttp%253A%252F%252Fgame.g.pptv.com%252Fuser%252Flogin%252F%2526iarVerifyCode%253D0d454d68-fd82-4c8b-bed6-ee33e7f308f3'
console.log(enCode(j, "ppvaslogin"))
